home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 038a / dframe26.zip / PBC-SUBS.DOC < prev   
Text File  |  1992-02-17  |  24KB  |  737 lines

  1.  
  2.  The following routines are available for your use. DoorFrame itself does not
  3. use most of the routines so you may retain or delete them from DFRAME.LIB as
  4. you see fit (the ones DoorFrame uses are noted - DON'T DELETE THEM!). The
  5. library is modularized so if you don't CALL a routine in your code, it will
  6. not be included in the final .EXE file. Since these routines come from the
  7. PBClone library by Tom Hanlin, I have taken the liberty of including his
  8. descriptions of the routines.
  9.  
  10.  
  11. Name  : BIOSInkey
  12. Class : Input
  13. Level : BIOS
  14.  
  15. BIOSInkey works like INKEY$, but it gets its key directly by asking the BIOS.
  16. The primary advantage of this is that you get the "scan" code as well as the
  17. ASCII code of the key.  The scan code is independent of the shift status--
  18. for instance, the scan code for "A" is the same as the scan code for "a" or
  19. Control-A or Alt-A.  This can be very handy.
  20.  
  21. If there is no key available, both the scan code and ASCII code will be zero.
  22.  
  23.    BIOSInkey AscCode%, ScanCode%
  24.  
  25. -------
  26. AscCode%    ASCII code of the key, if any
  27. ScanCode%   scan code of the key, if any
  28.  
  29. Name  : CalcAttr                (Called by DoorFrame - DON'T DELETE!)
  30. Class : Display
  31. Level : Any
  32.  
  33. An attribute is a combination of the foreground and background colors in a 
  34. format which is used by all types of displays when in text mode. 
  35.  
  36. Foreground colors are usually specified as 0-15, with backgrounds as 0-7.
  37.  
  38.    CalcAttr Foreground%, Background%, Attr%
  39.  
  40. Foreground%  foreground color
  41. Background%  background color
  42. -------
  43. Attr%        color "attribute"
  44.  
  45.  
  46. Name  : CDROM
  47. Class : Disk / Equipment
  48. Level : DOS
  49.  
  50. This routine tells you whether the Microsoft CD-ROM Extensions are installed.
  51. If so, it tells you what the letter of the first CD-ROM logical drive is and
  52. how many logical drives exist.
  53.  
  54. Note: The CD-ROM installation check conflicts with the GRAPHICS.COM
  55. installation check for DOS 4.0, due to some screw-up at IBM or Microsoft.
  56. This may cause unexpected results.  I'm not yet sure whether DOS 5.0 is
  57. similarly afflicted.
  58.  
  59.    FirstDrive$ = "x"
  60.    CDROM FirstDrive$, Drives%
  61.  
  62. -------
  63. FirstDrive$   letter of the first logical drive (init to at least one space!)
  64. Drives%       number of logical drives available (0 if no CD-ROM is there)
  65.  
  66.  
  67. Name  : CheckShare2%         (Check for SHARE)
  68. Class : Disk
  69. Level : DOS
  70.  
  71. The CheckShare2% function determines whether SHARE.EXE is active.  This is
  72. particularly helpful before using the BASIC OPEN statement, which will fail
  73. if you request file sharing when it's not available.  The PBClone file
  74. routines handle such situations automatically, so CheckShare2% is not needed
  75. for them.
  76.  
  77.    ShareActive% = CheckShare2%
  78.  
  79. -------
  80. ShareActive%   whether SHARE is active (0 if no)
  81.  
  82.  
  83. Name  : DelFile                 (Called by DoorFrame - DON'T DELETE!)
  84. Class : Disk
  85. Level : DOS
  86.  
  87. This works like the DOS DEL (or ERASE) command, although it does not allow
  88. wildcards.  The specified file is deleted.  Full path specifications are
  89. supported, including drive and subdirectory specs.
  90.  
  91.    DelFile FileName$, ErrCode%
  92.  
  93. FileName$   name of the file to delete
  94. -------
  95. ErrCode%    0 if no error, else DOS Error
  96.  
  97.  
  98. Name  : DriveSpace&
  99. Class : Disk
  100. Level : DOS
  101.  
  102. This routine tells you how many bytes are free on a specified disk drive.
  103.  
  104.    BytesFree& = DriveSpace&(Drive$)
  105.  
  106. Drive$      letter of the drive to examine
  107. -------
  108. BytesFree&  free bytes on the specified drive, or -1 if bad drive or disk error
  109.  
  110.  
  111. Name  : EMSBuffer
  112. Class : Memory
  113. Level : BIOS
  114.  
  115. EMSBuffer tells you how many bytes are needed to save the state of the EMS
  116. array routines.  Used in conjunction with EMSSave and EMSRest, it allows you
  117. to preserve EMS arrays across a CHAIN to another part of your program.
  118.  
  119.    EMSBuffer Bytes%
  120.    EMSState$ = SPACE$(Bytes%)
  121.    EMSSave EMSState$
  122.  
  123. -------
  124. Bytes%       bytes needed to save EMS array state
  125.  
  126.  
  127. Name  : EMSClose
  128. Class : Memory
  129. Level : BIOS
  130.  
  131. The EMSClose routine is used when you are finished with an EMS array.  It
  132. frees the array handle and EMS memory for other uses.  If you don't close all
  133. EMS arrays before your program ends, the memory will be lost until the system
  134. is rebooted, so it is important to remember EMSClose.
  135.  
  136.    EMSClose ArrayHandle%
  137.  
  138. ArrayHandle%    handle of an EMS array
  139.  
  140.  
  141. Name  : EMSGet
  142. Class : Memory
  143. Level : BIOS
  144.  
  145. This routine gets an element from an EMS array created by EMSOpen.  Element
  146. numbers start at 0.  Be sure to use the right numeric type for the array--
  147. for instance, if you opened the array for SINGLE precision, use "Value!".
  148.  
  149.    EMSGet ArrayHandle%, ElementNr&, Value
  150.  
  151. ArrayHandle%    handle of an EMS array
  152. ElementNr&      element number to get
  153. -------
  154. Value           value to get element into (must be correct type for array)
  155.  
  156.  
  157. Name  : EMSOpen
  158. Class : Memory
  159. Level : BIOS
  160.  
  161. This routine allows you to open a block of EMS (expanded) memory which can
  162. then be accessed like a numeric array.  The array size is limited only by
  163. available EMS memory (use GetLIMM to find out how much is available).  You
  164. may specify any numeric type:
  165.  
  166.     1   INTEGER
  167.     2   LONG or SINGLE
  168.     3   DOUBLE
  169.  
  170. When the array is opened, you are returned an "array handle" which is used to
  171. access that array.  Access to the array is done via EMSGet and EMSPut.  When
  172. you are finished with the array, you must close it with EMSClose.
  173.  
  174. As many as 25 EMS arrays can be in use at one time, subject to limitations
  175. which may be imposed by your EMS driver (each array requires one EMS handle).
  176.  
  177.    EMSOpen Elements&, ElementType%, ArrayHandle%, ErrCode%
  178.  
  179. Elements&       number of elements in array (like DIM size)
  180. ElementType%    numeric type of array (see above)
  181. -------
  182. ArrayHandle%    handle of an EMS array
  183. ErrCode%        whether an error occurred (0 no)
  184.  
  185.  
  186. Name  : EMSPut
  187. Class : Memory
  188. Level : BIOS
  189.  
  190. This routine puts an element into an EMS array created by EMSOpen.  Element
  191. numbers start at 0.  Be sure to use the right numeric type for the array--
  192. for instance, if you opened the array for SINGLE precision, use "Value!".
  193.  
  194.    EMSPut ArrayHandle%, ElementNr&, Value
  195.  
  196. ArrayHandle%    handle of an EMS array
  197. ElementNr&      element number to set
  198. Value           value to set element to (must be correct type for array)
  199.  
  200.  
  201. Name  : EMSRest
  202. Class : Memory
  203. Level : BIOS
  204.  
  205. This routine allows you to restore the state of the EMS array handler.  Used
  206. in conjunction with EMSBuffer and EMSSave, it allows you to preserve EMS
  207. arrays across a CHAIN to another part of your program.
  208.  
  209.    EMSRest EMSState$
  210.  
  211. EMSState$    saved EMS array state
  212.  
  213.  
  214. Name  : EMSSave
  215. Class : Memory
  216. Level : BIOS
  217.  
  218. This routine allows you to save the state of the EMS array handler.  Used in
  219. conjunction with EMSBuffer and EMSRest, it allows you to preserve EMS arrays
  220. across a CHAIN to another part of your program.
  221.  
  222.    EMSBuffer Bytes%
  223.    EMSState$ = SPACE$(Bytes%)
  224.    EMSSave EMSState$
  225.  
  226. -------
  227. EMSState$    saved EMS array state
  228.  
  229.  
  230. Name  : EnhKbd
  231. Class : Input
  232. Level : BIOS
  233.  
  234. By default, the PBClone routines assume an old-style keyboard is in use, for
  235. greatest compatibility.  EnhKbd allows you to turn on enhanced keyboard
  236. handling for the current generation of (usually) 101-key keyboards.  This
  237. allows access to the F11 and F12 function keys as well as codes for key
  238. combinations that used to be ignored, among other things.
  239.  
  240. The KbdType or KbdType2% routine can be used to determine if an enhanced
  241. keyboard is available (recommended).
  242.  
  243. Note that EnhKbd works by intercepting the BIOS keyboard handler.  All calls
  244. to the BIOS keyboard interrupt are converted from the old keyboard functions
  245. to the new ones.  YOU MUST DISABLE EnhKbd BEFORE YOUR PROGRAM ENDS, so it can
  246. restore the old setup.  Otherwise, the computer will most probably crash.
  247.  
  248.    EnhKbd Enable%
  249.  
  250. Enable%     turn on enhanced keyboard support (0 disable, else enable)
  251.  
  252.  
  253. Name  : Get4DOSv             (Get 4DOS Version)
  254. Class : Equipment
  255. Level : DOS
  256.  
  257. The Get4DOSv routine returns the version of 4DOS being used.  It returns the
  258. results as two integers containing the major and minor version numbers. For
  259. instance, 4DOS 4.0 would return a major number of 4, minor 0.  If 4DOS is not
  260. installed, both version numbers will be zero.
  261.  
  262. If you're not familiar with 4DOS, it's a terrific improved replacement for
  263. COMMAND.COM.  For more information, write JP Software Inc., P.O. Box 1470,
  264. Arlington MA 02174, or call your local BBS.
  265.  
  266.    Get4DOSv MajorV%, MinorV%
  267.  
  268. -------
  269. MajorV%   major part of the 4DOS version
  270. MinorV%   minor part of the 4DOS version
  271.  
  272.  
  273. Name  : GetDOSV                 (Called by DoorFrame - DON'T DELETE!)
  274. Class : Equipment
  275. Level : DOS
  276.  
  277. The GetDOSV routine tells you what version of DOS you're using.  It returns
  278. the results as two integers containing the major and minor version numbers.
  279. For instance, MS-DOS 2.11 would return a major number of 2, minor 11.
  280.  
  281. The OS/2 compatibility box returns version numbers beginning at 10.00.  For
  282. instance, OS/2 v1.1 returns 10.10 and OS/2 v2.0 returns 20.00.
  283.  
  284.    GetDOSV MajorV%, MinorV%
  285.  
  286. -------
  287. MajorV%   major part of the DOS version
  288. MinorV%   minor part of the DOS version
  289.  
  290.  
  291. Name  : GetDView
  292. Class : Miscellaneous
  293. Level : DOS
  294.  
  295. The GetDView routine tells you what version of DESQview is loaded.  It
  296. returns the results as two integers containing the major and minor version
  297. numbers.  For instance, DESQview 2.0 would return a major number of 2 and a
  298. minor number of 0.  If DESQview is not loaded, zeroes are returned.
  299.  
  300. See also GetTView, GetTVScreen, UpdTVScreen.
  301.  
  302.    GetDView MajorV%, MinorV%
  303.  
  304. -------
  305. MajorV%   major part of the DESQview version (0 if DESQview is not loaded)
  306. MinorV%   minor part of the DESQview version
  307.  
  308.  
  309. Name  : GetKbd
  310. Class : Input
  311. Level : Clone
  312.  
  313. The GetKbd routine allows you to get the state of the four keyboard toggles:
  314. Insert, Caps lock, Num lock, and Scroll Lock.
  315.  
  316.    GetKbd Insert%, Caps%, Num%, Scrl%
  317.  
  318. -------
  319. Insert%    whether "insert" mode is on (0 if no)
  320. Caps%      whether "caps lock" is on (0 if no)
  321. Num%       whether "num lock" is on (0 if no)
  322. Scrl%      whether "scroll lock" is on (0 if no)
  323.  
  324.  
  325. Name  : GetKbd1
  326. Class : Input
  327. Level : Clone
  328.  
  329. The GetKbd1 routine allows you to get the state of the four keyboard shift
  330. keys: Left shift, Right shift, Control and Alt.
  331.  
  332.    GetKbd1 LShift%, RShift%, Control%, Alt%
  333.  
  334. -------
  335. LShift%    whether the left shift key is depressed (0 if no)
  336. RShift%    whether the right shift key is depressed (0 if no)
  337. Control%   whether a control key is depressed (0 if no)
  338. Alt%       whether an alt key is depressed (0 if no)
  339.  
  340.  
  341. Name  : GetKbd2
  342. Class : Input
  343. Level : AT BIOS
  344.  
  345. The GetKbd2 routine allows you to get the state of the six keyboard shift
  346. keys on an "enhanced" keyboard: Left shift, Right shift, Left Control, Right
  347. Control, Left Alt and Right Alt.
  348.  
  349. Normally, the BIOS only lets you see one key at a time, which can be a
  350. barrier when you need more input.  This is a particular problem with action
  351. games and other real-time applications which have complex input requirements.
  352. Due to the special way the BIOS treats shift keys, GetKbd2 can tell if the
  353. the various shift keys are pressed simultaneously, allowing more flexibility.
  354.  
  355.    GetKbd2 LShift%, RShift%, LCtrl%, RCtrl%, LAlt%, RAlt%
  356.  
  357. -------
  358. LShift%    whether the left shift key is depressed (0 if no)
  359. RShift%    whether the right shift key is depressed (0 if no)
  360. LCtrl%     whether the left control key is depressed (0 if no)
  361. RCtrl%     whether the right control key is depressed (0 if no)
  362. LAlt%      whether the left alt key is depressed (0 if no)
  363. RAlt%      whether the right alt key is depressed (0 if no)
  364.  
  365.  
  366. Name  : GetLIMHandles
  367. Class : Memory
  368. Level : DOS
  369.  
  370. Early Lotus/Intel/Microsoft expanded memory revisions provided a limited
  371. number of "handles" which could be used to access expanded memory-- often as
  372. few as 15 or so.  If your program uses expanded memory and the EMS driver is
  373. one of the older versions, you may want to make sure that enough handles are
  374. available.  This routine tells you how many handles are in use.
  375.  
  376. Note that this routine expects an EMS driver to be installed.  If you can't
  377. be sure of that, use GetLIMM first to avoid an unpleasant surprise.
  378.  
  379.    GetLIMHandles Handles%
  380.  
  381. -------
  382. Handles%  number of EMS handles in use
  383.  
  384.  
  385.  
  386. Name  : GetLIMM
  387. Class : Memory / Equipment
  388. Level : DOS
  389.  
  390. This routine tells you how much expanded memory is installed.  If there is
  391. none, or if the EMS driver hasn't been installed, it returns zeroes.  You
  392. should use this routine before any other of the PBClone routines that access
  393. expanded memory, since the other routines expect EMS to be available.
  394.  
  395. The results are returned in terms of EMS pages.  Each page is 16 kilobytes.
  396.  
  397.    GetLIMM TotalPages%, FreePages%
  398.  
  399. -------
  400. TotalPages%  number of EMS pages installed
  401. FreePages%   number of EMS pages available for use
  402.  
  403.  
  404. Name  : GetLIMV
  405. Class : Memory / Equipment
  406. Level : DOS
  407.  
  408. The GetLIMV routine tells you the version of EMS driver that is being used.
  409. The version number is separated into major and minor parts.  For example, an
  410. EMS 3.1 driver would return a major number of 3 and minor number of 1.
  411.  
  412. Note that this routine expects an EMS driver to be installed.  If you can't
  413. be sure of that, use GetLIMM first to avoid an unpleasant surprise.
  414.  
  415.    GetLIMV MajorVer%, MinorVer%
  416.  
  417. -------
  418. MajorVer%  major part of the EMS version number
  419. MinorVer%  minor part of the EMS version number
  420.  
  421.  
  422. Name  : GetTView             (Get TopView)
  423. Class : Miscellaneous
  424. Level : BIOS
  425.  
  426. This routine tells you whether TopView or a compatible multitasker (such as
  427. TaskView or DESQview) is loaded.
  428.  
  429. See also GetDView, GetTVScreen, UpdTVScreen.
  430.  
  431.    GetTView Installed%
  432.  
  433. -------
  434. Installed%   whether a TopView-type multitasker is loaded (0 no)
  435.  
  436.  
  437. Name  : GetTVScreen          (Get TopView Screen address)
  438. Class : Display / Miscellaneous
  439. Level : BIOS
  440.  
  441. GetTVScreen returns the address of the screen buffer used by a TopView-type
  442. multitasker.  This allows you to use direct screen access while remaining
  443. within the windows allocated to your program by the multitasker.
  444.  
  445. You must tell the multitasker the address of the screen you would be writing
  446. to if the multitasker was not installed.  Specify a segment of &HB000 if
  447. using an MDA or Hercules, or a segment of &HB800 for CGA, EGA, MCGA or VGA.
  448. The offset should always be 0.  This is for use in text modes.
  449.  
  450. The routine will return with the new segment and offset for you to use.
  451. These values can be used with any PBClone screen routine that accepts a
  452. segment and offset-- DQPrint and DXQPrint, for example.
  453.  
  454. Note that not all TopView-compatible multitaskers will automatically update
  455. the screen from the buffer.  The UpdTVScreen routine allows you to force a
  456. screen update.
  457.  
  458. See also GetDView, GetTView, UpdTVScreen.
  459.  
  460.    GetTVScreen DSeg%, DOfs%
  461.  
  462. DSeg%       segment of desired screen
  463. DOfs%       offset of desired screen
  464. -------
  465. DSeg%       segment of screen buffer
  466. DOfs%       offset of screen buffer
  467.  
  468.  
  469. Name  : KbdType
  470. Class : Input / Equipment
  471. Level : Clone
  472.  
  473. This routine tells you if an enhanced (101-key) keyboard is available.
  474.  
  475. KbdType differs from the ProBas routine of the same name in that it has
  476. additional error checking.  If it is not entirely sure that an enhanced
  477. keyboard is available, it plays safe and assumes there isn't one.  This
  478. avoids possible disaster on older PCs.
  479.  
  480.    KbdType Enhanced%
  481.  
  482. -------
  483. Enhanced%    whether keyboard is of the enhanced type (0 no)
  484.  
  485.  
  486. Name  : KeyPress
  487. Class : Input
  488. Level : DOS
  489.  
  490. This routine works like the Turbo/Power BASIC function INSTAT.  It tells you
  491. whether there is a key waiting to be processed.
  492.  
  493.    KeyPress KeyHit%
  494.  
  495. -------
  496. KeyHit%   whether a key is waiting (0 if no)
  497.  
  498.  
  499. Name  : LClose
  500. Class : Memory
  501. Level : BIOS
  502.  
  503. This routine closes a block of expanded memory that was opened for access by
  504. LOpen.  It is important to close the block when you are finished with it, to
  505. return it to the free memory pool.
  506.  
  507. Routines in this suite include: LOpen, LGet, LPut, LClose.
  508.  
  509.    LClose EMSHandle%
  510.  
  511. EMSHandle%    handle of the expanded memory block
  512.  
  513.  
  514. Name  : LGet
  515. Class : Memory
  516. Level : BIOS
  517.  
  518. This routine gets a block of data from expanded memory that was opened for
  519. access by LOpen.  The amount of data is specified in words; one word is the
  520. same as two bytes.  An integer takes up a word, long integers and single
  521. precision numbers require two words, and double precision numbers take four.
  522.  
  523. Routines in this suite include: LOpen, LGet, LPut, LClose.
  524.  
  525.    LGet EMSHandle%, DSeg%, DOfs%, Words%
  526.  
  527. EMSHandle%    handle of the expanded memory block
  528. DSeg%         segment of place to store data
  529. DOfs%         offset of place to store data
  530. Words%        words to get from expanded memory
  531.  
  532.  
  533. Name  : LOpen
  534. Class : Memory
  535. Level : BIOS
  536.  
  537. This routine opens a block of expanded memory for access.  The size of the
  538. block is specified in words; one word is the same as two bytes.  An integer
  539. takes up a word, long integers and single precision numbers require two
  540. words, and double precision numbers take four.  This allows you to store up
  541. to 64K in each EMS block that you open.
  542.  
  543. Note that LOpen expects an EMS driver to be available.  If you are not
  544. certain on this point, use GetLIMM beforehand to make sure.
  545.  
  546. Routines in this suite include: LOpen, LGet, LPut, LClose.
  547.  
  548.    LOpen Words%, EMSHandle%, ErrCode%
  549.  
  550. Words%        size of expanded memory block to allocate
  551. -------
  552. EMSHandle%    handle of the expanded memory block
  553. ErrCode%      error code (0 if no error)
  554.  
  555.  
  556. Name  : LPut
  557. Class : Memory
  558. Level : BIOS
  559.  
  560. This routine puts a block of data into expanded memory that was opened for
  561. access by LOpen.  The amount of data is specified in words; one word is the
  562. same as two bytes.  An integer takes up a word, long integers and single
  563. precision numbers require two words, and double precision numbers take four.
  564.  
  565. Routines in this suite include: LOpen, LGet, LPut, LClose.
  566.  
  567.    LPut EMSHandle%, DSeg%, DOfs%, Words%
  568.  
  569. EMSHandle%    handle of the expanded memory block
  570. DSeg%         segment of place from which to get data
  571. DOfs%         offset of place from which to get data
  572. Words%        words to put into expanded memory
  573.  
  574.  
  575. Name  : LRotate
  576. Class : String
  577. Level : Any
  578.  
  579. Many years ago, I wrote one of the first terminal programs for the PC.  It
  580. died a horrible death when Qmodem came out... sigh.  This routine comes from
  581. that experience.  It rotates the characters in a string left once (e.g.,
  582. "ABCDE" becomes "BCDEA").  I used this in my routine to dial a list of BBSes,
  583. skipping to the next one if the current one was busy.
  584.  
  585. LRotate can also be handy for things like scrolling a long message across the
  586. screen (you just PRINT LEFT$(Message$, 80); then delay a bit, LRotate and do
  587. it again).
  588.  
  589.    LRotate St$
  590.  
  591. St$     string to be rotated left once
  592. -------
  593. St$     string after being rotated left once
  594.  
  595.  
  596. Name  : NameCase                (Called by DoorFrame - DON'T DELETE!)
  597. Class : String
  598. Level : Any
  599.  
  600. This routine provides a specialized uppercase/lowercase converter designed
  601. especially for names.  It converts the first letter in each word in a string
  602. to uppercase, with the rest of the word being converted to lowercase.
  603.  
  604. See also NameCase2, the FUNCTION version of this routine.
  605.  
  606.    NameCase St$
  607.  
  608. St$         string to process
  609. -------
  610. St$         processed string
  611.  
  612.  
  613. Name  : Processor
  614. Class : Equipment
  615. Level : Any
  616.  
  617. Processor returns the type of processor (CPU) installed.
  618.  
  619. Results are returned as follows:
  620.  
  621.    0    NEC V20
  622.    1    8088 or 8086
  623.    2    80186
  624.    3    80286
  625.    4    80386 or 80486
  626.  
  627. If anyone can tell me how to better handle a 486 here, I'd appreciate it.
  628.  
  629. The ProBas version of this routine can't recognize a NEC processor.
  630.  
  631.    Processor ProcType%
  632.  
  633. -------
  634. ProcType%    type of CPU (see above)
  635.  
  636.  
  637. Name  : Retries
  638. Class : Disk
  639. Level : DOS 3.1+
  640.  
  641. This routine allows you to adjust the handling of file-sharing errors.  When
  642. such an error occurs, DOS normally retries 3 times, with a wait of 1 between
  643. tries.  This allows temporary conditions, such as someone else using the file
  644. you want to access, to clear up.  In many cases, though, you may want to
  645. change this delay.  A shorter delay will improve response time, allowing your
  646. program to handle the error more quickly.  A longer delay may be more suited
  647. for a busy network, allowing the request to proceed after a reasonable
  648. waiting period.
  649.  
  650. The delay period between each retry is unfortunately machine-dependent, i.e.,
  651. you will need larger delays on faster machines to achieve the same effect.
  652. This can only be considered a flaw in DOS.
  653.  
  654. Note that shorter waiting periods will improve response time for your
  655. program, but may adversely affect the network.  Normally, you should use the
  656. longest waiting period with which you feel comfortable.
  657.  
  658.    Retries Times%, WaitTime%
  659.  
  660. Times%     number of times to retry if a file-sharing violation occurs
  661. WaitTime%  amount of time to delay between retries
  662.  
  663.  
  664. Name  : SetError
  665. Class : Miscellaneous
  666. Level : DOS
  667.  
  668. The SetError routine allows you to set the "error level" to be returned by
  669. DOS when your program ends.  This is particularly handy for returning
  670. information to batch files.
  671.  
  672. Note that SetError is best used just before your program ENDs, to avoid
  673. complications.
  674.  
  675.    SetError ErrorLevel%
  676.  
  677. ErrorLevel%   exit code to be returned by your program
  678.  
  679.  
  680. Name  : SetKbd
  681. Class : Input
  682. Level : Clone
  683.  
  684. The SetKbd routine allows you to set the state of any of the four keyboard
  685. toggles: Insert, Caps lock, Num lock, and Scroll Lock.  You can give your
  686. input routines a professional touch by setting this toggles instead of making
  687. the user remember to do so.
  688.  
  689. It's considered proper to restore the original keyboard toggles before your
  690. program exits, unless of course the purpose of the program is to leave the
  691. toggles in a particular state!  The GetKbd routine can be used in conjunction
  692. with SetKbd to do this.
  693.  
  694.    SetKbd Insert%, Caps%, Num%, Scrl%
  695.  
  696. Insert%    whether to turn on "insert" mode (0 if no)
  697. Caps%      whether to turn on "caps lock" (0 if no)
  698. Num%       whether to put the keypad into numeric mode (0 if no)
  699. Scrl%      whether to turn on "scroll lock" (0 if no)
  700.  
  701.  
  702. Name  : UpdTVScreen          (Update TopView Screen)
  703. Class : Display
  704. Level : BIOS
  705.  
  706. UpdTVScreen tells a TopView-compatible multitasker to update the screen using
  707. a specified screen buffer (use GetTVScreen to get the buffer location).  Some
  708. multitaskers will do this automatically, but some won't.  It's safe to use
  709. this routine either way.
  710.  
  711. See also GetDView, GetTView, GetTVScreen.
  712.  
  713.    UpdTVScreen DSeg%, DOfs%
  714.  
  715. DSeg%       segment of screen buffer
  716. DOfs%       offset of screen buffer
  717.  
  718.  
  719. Name  : WinCheck             (Windows Check)
  720. Class : Equipment
  721. Level : BIOS
  722.  
  723. The WinCheck routine tells you what version of Microsoft Windows is in use,
  724. if any.  It returns the results as two integers containing the major and
  725. minor version numbers.  For instance, Windows 3.0 would return a major number
  726. of 3, minor 0.  Windows/386 v2.x will be identified as 2.0.  If Windows is
  727. not running, 0.0 will be returned.  NOTE that this routine is not able to
  728. detect Windows 1.x versions!
  729.  
  730.    WinCheck MajorV%, MinorV%
  731.  
  732. -------
  733. MajorV%   major part of the Windows version
  734. MinorV%   minor part of the Windows version
  735.  
  736. 
  737.